
<br/>
<table width="100%" border="0" cellspacing="10" cellpadding="5" align="center" bgcolor="#ebf9b4">
  <tr>
  	<td rowspan='5' width="25%">
    <!--/*image upload on forums
	accepts .bmp, .jpg, .jpeg, and .gif
	that limits the updload upto 1MB.
	-->
	<?php 
	$data = mysql_query("SELECT * from `tbluser` where email='$email'"); //where condition
	while($row = mysql_fetch_array($data)){	
	
	if($row[15] == NULL)//if dp is null... set to default pic
	{$up_query = mysql_query("UPDATE `tbluser` SET avatar='defaultdp.png' WHERE email='$email'");}

	echo "<div class='img_h'>
		<img src='avatar/"."$row[15]"."' width='150px' />
		<br/><center>Current Picture</center></div>";
		
	$_SESSION['old_pic'] = $row[15];
	}
	?>
	</td>
    <td class="center_" width="75%">Select an image file on your computer (2MB maximum):</td>
  </tr>
  <tr>
    <td align="center">
    <form enctype="multipart/form-data" action="profile.php?sel=dpupload" method="post"> 
    <input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
    <input type="file" name="uploaded_file"  />
    </td>
  </tr>
  <tr>
    <td align="center"><input type="submit" value="Upload" id="bbtn"/></form></td>
  </tr>
  <tr>
    <td align="center">&nbsp;</td>
  </tr>
</table>
